/*
 * Copyright (c) 2024. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

package com.neusoft.tyut.myspring.myaspect.impl;

import com.neusoft.tyut.myspring.myaspect.DeptService;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;

//  默认的bean id为类名首字母小写
@Component("deptService")
public class DeptServiceImpl implements DeptService {
    SimpleDateFormat format = new SimpleDateFormat();

    @Override
    public int addDept() {
        System.out.println("DeptServiceImpl.addDept");

        if (System.currentTimeMillis() % 2 == 0) {
            throw new RuntimeException("操作失败");
        }

        long l = 100000000000001L;
        System.out.println(Long.toHexString(l));
        int ll = 0x107a4001;
        System.out.println(ll);
        return (int) System.currentTimeMillis(); // --- >16
    }
}
